import http from '@/http'
// 权限相关

// 获取权限列表
const getPermissionList = (params) => {
    return http.get('v1/permissions', { params })
}

// 添加权限
const addPermission = (params) => {
    return http.post('v1/permissions', params)
}

// 编辑权限
const editPermission = (params) => {
    return http.put(`v1/permissions/${params.id}`, params)
}

// 删除权限
const deletePermission = (id) => {
    return http.delete(`v1/permissions/${id}`)
}

export { getPermissionList, addPermission, editPermission, deletePermission }